Skip to content

ci: stop apt from gating the showcase Chromium install - #1034

Merged
leoafarias merged 1 commit into
mainfrom
ci/playwright-install-resilience
Aug 19, 2026
Merged

ci: stop apt from gating the showcase Chromium install#1034
leoafarias merged 1 commit into
mainfrom
ci/playwright-install-resilience

Conversation

@leoafarias

Copy link
Copy Markdown
Member

Root cause

Showcase Tool Tests has been intermittently hanging. The logs from PR #1031 pin it down precisely — it is not the browser download, it is apt.

npx playwright install --with-deps chromium shells out to apt-get, which then stops responding against the Azure Ubuntu mirror:

Installing dependencies...
Switching to root user to install dependencies...
Ign:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
Ign:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease
...
##[error]The action 'Install Chromium' has timed out after 10 minutes.

Nothing was logged for the 9.5 minutes between the last InRelease line and the timeout.

Evidence it is the mirror and not the diff or the download:

The step bound added in #1033 is doing its job here: it converted a six-hour hang into a labelled 10-minute failure that names the culprit. This PR removes the cause.

Fix

Drop --with-deps. That flag exists to apt-get install Chromium's shared libraries. The ubuntu-24.04 runner image already ships them, and Playwright is pinned to 1.57.0 here — well past 1.45, where Ubuntu 24.04 support landed. This takes apt off the critical path entirely.

Cache ~/.cache/ms-playwright keyed on the lockfile. The browser only changes when the pinned Playwright version does, so most runs skip the download entirely.

Risk, and why it is the right trade

If a future runner image drops a library, Chromium fails to launch. That surfaces as a missing-library error naming the library, in seconds — and the fix is to apt-get install that one package, not to put all of apt back in front of every run. That is a strictly better failure mode than an unexplained hang. The reasoning is recorded in a comment on the step so it does not get "helpfully" reverted later.

Worth noting the job genuinely needs a browser: test/visual-report.test.mjs calls chromium.launch() to verify the generated report opens without console errors. So dropping the install altogether was not an option — only the apt half is unnecessary.

Verification

Deliberately proven in CI rather than argued: this PR's first run has a cache miss, so it exercises the real npx playwright install chromium path without --with-deps. If the job goes green, the removal is confirmed on the actual runner image.

`npx playwright install --with-deps chromium` shells out to apt-get, and the
Azure Ubuntu mirror on GitHub's runners intermittently stops responding there.
It stalled this job for 21 minutes on PR #1032, and on PR #1031 it hit the
10-minute step bound from #1033 with apt still retrying InRelease fetches
against azure.archive.ubuntu.com. Every other step in the job passed both
times, and the same job succeeded in ~2 minutes on other runs, so the browser
download itself was never the problem.

Drop --with-deps. The ubuntu-24.04 runner image already ships Chromium's shared
libraries, and Playwright here is pinned to 1.57, well past the 1.45 release
where Ubuntu 24.04 support landed. If a future image drops a library, the
launch fails fast with a missing-library error naming it, which is a better
signal than an apt hang and is fixable by adding that one package instead of
putting all of apt back on the critical path.

Also cache ~/.cache/ms-playwright keyed on the lockfile. The browser only
changes when the pinned Playwright version does, so most runs now skip the
download entirely rather than re-fetching it.
@github-actions github-actions Bot added the repo label Aug 19, 2026
@leoafarias
leoafarias merged commit 93953a7 into main Aug 19, 2026
5 checks passed
@leoafarias
leoafarias deleted the ci/playwright-install-resilience branch August 19, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant